#! /bin/bash

readonly parent_dir=$(dirname $(realpath $0));
readonly dev_env_dir=$(dirname $(dirname $(dirname $parent_dir)));

sudo ${dev_env_dir}/py exec apt/ensure cifs-utils;

readonly unit_file_path=$parent_dir/mnt-local_share.mount;
readonly unit_file_link_path=/etc/systemd/system/mnt-local_share.mount;

if [ -e $unit_file_link_path ]
then
  sudo rm $unit_file_link_path;
fi

sudo ln -sf $unit_file_path $unit_file_link_path

sudo systemctl daemon-reload
sudo systemctl restart mnt-local_share.mount
sudo systemctl enable mnt-local_share.mount
